import { get, post, del } from '../tools/request';
// eslint-disable-next-line import/prefer-default-export
export const RequestAPI = (page = 1, category = '') =>
  // eslint-disable-next-line implicit-arrow-linebreak
  get('/api/v1/products', { page, category });
export const loadDataByIdAPI = (id) => get(`/api/v1/products/${id}`);
export const ShopCarDataAPI = () => get('/api/v1/shop_carts');
export const AlertShopCarDataAPI = (data) => post('/api/v1/shop_carts', data);
export const DeletShopCarDataAPI = (id) => del(`/api/v1/shop_carts/${id}`);
export const SubmmitDataAPI = (data) => post('/api/v1/orders', data);
export const GetOrderListAPI = (page = 1, per = 10) => get('/api/v1/orders', { page, per });
export const OrdersAPI = (id) => get(`/api/v1/orders/${id}`);
